﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ZDMHelper
{
    public partial class FormInitialization : Form
    {
        private string xlsFileName = "";

        public string XLSFileName
        {
            get { return xlsFileName; }
        }

        public LineDirection Direction
        {
            get
            {
                if (this.rdnLeftRight.Checked)
                {
                    return LineDirection.LeftToRight;
                }
                else
                {
                    return LineDirection.RightToLeft;
                }
            }
        }

        public FormInitialization()
        {
            InitializeComponent();
        }

        private void txtFileName_DoubleClick(object sender, EventArgs e)
        {
            OpenFileDialog opd = new OpenFileDialog();
            opd.Filter = "Microsoft Office Excel 文件(*.xls)|*.xls";//考虑07文件
            if (opd.ShowDialog() == DialogResult.OK)
            {
                this.txtFileName.Text = opd.FileName;
                FontFamily fontFamily = new FontFamily("宋体");
                this.txtFileName.Font = new Font(fontFamily, 9, FontStyle.Regular);
                this.txtFileName.ForeColor = Color.FromKnownColor(KnownColor.WindowText);
                xlsFileName = opd.FileName;
            }
        }
    }
}
